package com.canopys.study.open.test.netty.dubbo.invoker;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author: Canopys
 * @Descrption:
 * @Date: Created in 23:58 2020/1/14
 * @Modified By:
 */
@Getter
@Setter
public class ResultHandler extends ChannelInboundHandlerAdapter {

    private Object response;

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        //super.channelRead(ctx, msg);
        response = msg;
        ctx.close();
    }
}
